<%@ Page Theme="BlueSkin" Title="LMS : Admin --> Organization Tree" Language="C#" MasterPageFile="~/LmsWebSite/MasterEN.master" AutoEventWireup="true" CodeFile="OrganizationEN.aspx.cs" Inherits="OrganizationEN" %>









<%@ Register src="OrganizationChartControl.ascx" tagname="OrganizationChartControl" tagprefix="uc2" %>




<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
    
    
    
   


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:UpdatePanel ID="up1" runat="server" >
    <ContentTemplate>
        <asp:UpdateProgress ID="uprogress1" runat="server">
            <ProgressTemplate>
            
                <div style="position:fixed;width:30px;height:30px;top:0px;right:0px;border:1px solid orange;">
                    <img src="images/loading.gif" style="width:30px;height:30px;"  alt='Loading' title='Loading'/>
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
    
        
        
        
        
<table cellspacing="5" cellpadding="5" width="100%">
        <tr>
            <td align="left" class="heading">
                Admin -- > Organization Tree
            </td>
        </tr>
    </table>
    <br />
    
    <div class="aligning allWidthWithMargins  direction" style="margin-bottom:10px;margin-left:30px;margin-right:30px;font-size:14px;">
       
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblChooseItem" runat="server" Text="Choose item : "></asp:Label>
        </div>
      
        <div class="floating aligning direction" style="width:600px;">

            <asp:TreeView ID="tvOrganizations" runat="server" OnSelectedNodeChanged="tvOrganizations_SelectedNodeChanged">
                <DataBindings>
                    <asp:TreeNodeBinding ImageUrlField="TypeImageUrl" TextField="NameEN" ValueField="ID" />
                </DataBindings>
            </asp:TreeView>
        
        </div>

        
      
      
               
        
       <div class="clearing" style="width:1px;height:30px;"></div>




       <div class="floating aligning direction" style="width:200px;">
            <asp:Label  runat="server" Text="Choose item : "></asp:Label>
        </div>
      
        <div class="floating aligning direction" style="width:600px;">

           <uc2:OrganizationChartControl ID="ocItem"  runat="server" isParent="false"  AutoPostBack="true" OnItemChanged="ocItem_ItemChanged"/>
        
        </div>

        
      
      
               
        
       <div class="clearing" style="width:1px;height:30px;"></div>


        
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblParent" runat="server" Text="Choose parent : "></asp:Label>
        </div>
        
        <uc2:OrganizationChartControl ID="oc1"  runat="server" isParent="true"  AutoPostBack="true" OnItemChanged="oc1_ItemChanged" />
       
       
       
       <div class="clearing" style="width:1px;height:30px;"></div>
       
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblNameAR" runat="server" Text="Arabic Name *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtNameAR" runat="server" Text="" style="width:250px;"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvNameAR" runat="server" ErrorMessage="You must enter an arabic name" ControlToValidate="txtNameAR">*</asp:RequiredFieldValidator>
        </div>
        
        <div class="clearing" style="width:1px;height:10px;"></div>
       
      <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblNameEN" runat="server" Text="English Name *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtNameEN" runat="server" Text="" style="width:250px;"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvNameEN" runat="server" ErrorMessage="You must enter an english name" ControlToValidate="txtNameEN">*</asp:RequiredFieldValidator>
        </div>
        
       
       <div class="clearing" style="width:1px;height:30px;"></div>
       
        <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblOrgCode" runat="server" Text="Organization code *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:TextBox ID="txtOrgCode" runat="server" Text="" style="width:250px;"></asp:TextBox>
        </div>  
       <div class="floating aligning direction" >
           <asp:RequiredFieldValidator ID="rfvOrgCode" runat="server" ErrorMessage="You must enter a code" ControlToValidate="txtOrgCode">*</asp:RequiredFieldValidator>
        </div>
       
       
       
        <div class="clearing" style="width:1px;height:10px;"></div>
       
      <div class="floating aligning direction" style="width:200px;">
            <asp:Label ID="lblChartType" runat="server" Text="Type *"></asp:Label>
        </div>        
        
       <div class="floating aligning direction" style="width:250px;">
           <asp:DropDownList ID="ddlChartType" runat="server" style="width:250px;">
           </asp:DropDownList>
        </div>  
       <div class="floating aligning direction" >
           
        </div>
        
        
        <div class="clearing" style="width:1px;height:30px;"></div>
        
        <div class="floating direction" style="width:500px;text-align:right">
           
           
           <div style="float:right;"><asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            <div style="float:right;font-size:1px;width:5px;height:1px;"></div>
            <div style="float:right;"><asp:Button ID="btnDelete" runat="server" Text="Delete" 
                OnClientClick="javascript:return confirm('Are you sure , you want to delete this organization part ?');" 
                onclick="btnDelete_Click" style="height: 26px" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            <div style="float:right;font-size:1px;width:5px;height:1px;"></div>
            <div style="float:right;"><asp:Button ID="btnNew" runat="server" Text="New" onclick="btnNew_Click" CausesValidation="false" BorderStyle="Solid" BorderColor="Orange" BackColor="DarkOrange" ForeColor="White"/></div>
            
           <%-- <div style="float:right;width:60px;padding-top:4px;">
                <asp:HyperLink ID="lnkBack" runat="server" NavigateUrl="~/LmsWebSite/OrganizationViewEN.aspx">Back</asp:HyperLink>
            
            </div>--%>
            
            <div class="clearing"></div>
           
        
        </div>
        
        <div class="clearing" style="width:1px;height:10px;"></div>
        
        
        <div class="floating alinging direction" style="width:500px;">
            <asp:ValidationSummary ID="vs1" runat="server" />
           <br />
            <asp:Label ID="lblError" EnableViewState="false" runat="server" Text="" ForeColor="Red" Width="100%"></asp:Label>
           <br />
           <asp:Label ID="lblResult" EnableViewState="false" runat="server" Text="" ForeColor="Green" Width="100%"></asp:Label>
        
        
        </div>
            
        
        
        
        <div class="clearing" style="margin-bottom:200px;">
            
        </div>
       
       
       
       
    </div>
    
    
    
    
        
    
    
        </ContentTemplate>
        </asp:UpdatePanel>


</asp:Content>

